package main

import "fmt"

func main(){
var arr [5]int
arr[0] = 1
arr[1] = 1
arr[2] = 1
s := arr[:]
fmt.Printf("%#v",s)
sum(arr[:]...)// 只能是切片打散
sum(1,2,3,3)
}


func sum(s ...int)int{
	fmt.Printf("%#v",s)
	count := 0
	for _,v := range s{
		count += v
	}
	return count
}

// 切片打散传递
// 参数接受





// 函数不能再函数内定义
